#include "led.h"

void Led_Dis(unsigned char addr,unsigned char enable)
{
	unsigned char temp = 0x00;//
	unsigned char temp_old = 0xff;
	P2 = (P2&0x1f) | 0x80;
	if(enable)	
	temp |= 0x01 << addr;
	else
	temp &=~(0x01 << addr);
	
	if(temp != temp_old)
	{
		P0 = ~temp;
		P2 &= 0x1f;
		temp_old = temp;
	}
	
}